<template>

  <div>
    <ul class="me-menu-list">
      <li class="me-menu-item">
        <div class="fx-row-center fx-row fx-row-space-between">
            <h5 class="me-menu-name">
              头像
            </h5>
            <div class="text-right">
                <div v-touch:tap="changeHead" class="bg-img-clip user-head" :style="{'backgroundImage':`url(${user.userIcon})`}">
                </div>
            </div>
        </div>
      </li>
      <li class="me-menu-item">
        <div class="fx-row-center fx-row fx-row-space-between">
          <h5 class="me-menu-name">
            昵称
          </h5>
          <div class="text-right">
            <input class="input-base" type="text" placeholder="请输入昵称"  v-model="user.userName" />
          </div>
        </div>
      </li>

      <li class="me-menu-item">
        <div class="fx-row-center fx-row fx-row-space-between">
          <h5 class="me-menu-name">
            性别
          </h5>
          <div class="text-right">
            <span>男</span>
          </div>
        </div>
      </li>

      <li class="me-menu-item" style="margin-top:15px;">
        <div class="fx-row-center fx-row fx-row-space-between">
          <h5 class="me-menu-name">
            手机号
          </h5>
          <router-link class="text-right"  :to="{'path' : '/auth/bindUser'}">
            <input readonly class="input-base" type="number" placeholder="绑定手机获取更多服务"  v-model="user.phone" />
          </router-link>
        </div>
      </li>


      <li class="me-menu-item" style="margin-top:15px;">
        <div class="fx-row-center fx-row fx-row-space-between">
          <h5 class="me-menu-name">
            匿名
          </h5>
          <div class="text-right">
            <mt-switch v-model="user.isAnonymousChecked"></mt-switch>
          </div>
        </div>
      </li>
    </ul>

    <div class="fx-row fx-row-center" style="padding : 15px 10px;">
      <input type="checkbox"  v-model="agreement"  id="agreement" />
      <label class="user-agreement" for="agreement">
        您已同意并接受 <a href="javascript:void(0)" class="text-primary">《Vii健身用户协议》</a>
      </label>
    </div>


    <div class="pl10 pr10" style="margin-top:50px; margin-bottom:30px;">
      <button  v-touch:tap="onUpdateUser" type="button"   class="btn-ve-md btn-lg btn btn-block btn-primary">保存信息</button>
    </div>


  </div>
</template>
<style lang="scss" scoped>
  .user-agreement{
    font-size: 14px;
    color: #9B9B9B;
    margin-left: 10px;
  }
  .me-menu-list{
    margin-top: 25px;
    .me-menu-item{
      margin-top: 1px;
      background: #fff;
      padding: 15px 15px;


        .user-head{
          width: 47.5px;
          height: 47.5px;
        }

      .input-base{
        border: 0;
        text-align: right;
        padding: 0;
      }

      .me-menu-name{
          margin-left: 10px;
          font-size: 15px;
      }

      .me-menu-icon{
      }
    }
  }

</style>
<script src="./../js/updateUserInfo.js"></script>



